<div class="modal-header" id="scope">
	<h3 class="modal-title" ng-if="param.type == 'insert'">新增</h3>
	<h3 class="modal-title" ng-if="param.type == 'update'">修改</h3>
</div>
<div class="modal-body">
	<form name="myForm" class="form-horizontal form-validation">
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="form-group" ng-if="param.type=='insert'">
					<label class="col-sm-2 control-label">
						<span style="color: red; text-align: center;" >* &nbsp</span>车辆：
					</label>
					<div class="col-sm-5">
						<div class="input-group w-full">
							<ui-select multiple ng-model="selected.vehicles" theme="bootstrap">
								<ui-select-match placeholder="选择车辆...">{{$item.code}}</ui-select-match>
								<ui-select-choices repeat="v in vehicles | propsFilter: {code: $select.search, number: $select.search}">
									<span ng-bind-html="'编号: '+v.code | highlight: $select.search"></span>
									<small ng-bind-html="'车牌号: '+v.number | highlight: $select.search"></small>
								</ui-select-choices>
							</ui-select>
						</div>
					</div>
					<div class="col-sm-5">
						<p>必填，选择要生成资源的车辆档案，可多选。当选择多个车辆档案时，下面填写的参数为每个车辆资源的参数。</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">
						<span style="color: red; text-align: center;" >* &nbsp</span>车辆票数：
					</label>
					<div class="col-sm-5">
						<ui-select ng-model="selected.ticket" theme="bootstrap">
							<ui-select-match placeholder="选择票数">{{$select.selected}}</ui-select-match>
							<ui-select-choices repeat="ticket in tickets">
								<span ng-bind-html="ticket"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<div class="col-sm-5">
						<p>必填，单个车辆的票数</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">
						<span style="color: red; text-align: center;" >* &nbsp</span>超发率：
					</label>
					<div class="col-sm-5">
						<div class="input-group">
							<input type="text" class="form-control" placeholder="超发率" ng-model="param.data.rate" ng-pattern=/^[1-9][0-9]{2,}$/ required/>
							<span class="input-group-addon">%</span>
						</div>
					</div>
					<div class="col-sm-5">
						<p>必填，默认为100%，单个车辆资源在票池中的总票数 = 票数 X 超发率%（取整数）。</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">
						<span style="color: red; text-align: center;" >* &nbsp</span>当前线路：
					</label>
					<div class="col-sm-5">
						<ui-select ng-model="selected.route" theme="bootstrap">
							<ui-select-match placeholder="选择线路">
								{{$select.selected.city1.name+' ➡ '+$select.selected.city2.name}}
							</ui-select-match>
							<ui-select-choices repeat="r in routes | propsFilter:{code: $select.search}">
								<span ng-bind-html="r.code | highlight: $select.search"></span>
								<small ng-bind-html="r.city1.name+' ➡ '+r.city2.name | highlight: $select.search"></small>
							</ui-select-choices>
						</ui-select>
					</div>
					<div class="col-sm-5">
						<p>必填，指定车辆资源的运行线路及当前位置。如：选择“武汉➡天门”则表示车辆当前在武汉，运行线路为武汉、天门的往返路线</p>
					</div>
				</div>
				<div class="form-group" ng-show="code!= '200'">
					<label class="col-sm-2 control-label">立即激活：</label>
					<div class="col-sm-5">
						<label class="i-checks i-checks-lg">
							<input class="form-control" type="checkbox" ng-model="selected.activate">
							<i></i>
						</label>
					</div>
					<div class="col-sm-5">
						<p>选填，是否在资源生成后立即激活并将其加入票池中。</p>
					</div>
				</div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
				<button class="btn btn-default" type="button" ng-click="cancel()">取消</button>
				<button type="submit" class="btn btn-success" ng-click="ok()">提交</button>
			</footer>
		</div>
	</form>
</div>